import { request } from "umi";

export function getCinemaList(ticketFlag: string) {
  return request<API.CinemaList>("mall.film-ticket.cinema.list", {
    params: {
      cityId: 440300,
      ticketFlag,
      k: 684555,
    },
  });
}

/**
 * 获取影院的电影列表数据
 */
export function getCinemaFilmList(cinemaId: number = 6269) {
  return request<API.CinemaFilmList>("mall.film-ticket.film.cinema-show-film", {
    params: {
      cinemaId,
      k: 2001699,
    },
  });
}

export function getCinemaFilmScheduleList(
  cinemaId: number = 6268,
  filmId: number,
  date: number
) {
  return request<API.CinemaFilmScheduleList>("mall.film-ticket.schedule.list", {
    params: {
      cinemaId,
      filmId,
      date,
      k: 2001699,
    },
  });
}
